package demo.java.springboot.mybatis.sys.dao;

import java.util.List;
import java.util.Map;

import demo.java.springboot.mybatis.sys.po.Dictionary;
import org.apache.ibatis.annotations.Param;

public interface DictionaryDao {

	Dictionary findById (Integer id);
	
	List<Dictionary> findAllByName (String name);
	
	Dictionary findByIdWithAlias (Integer id);
	
	Dictionary findByIdWithResultMap (Integer id);
	
	Dictionary findByNameAndType(Dictionary search);
	
	Dictionary findByNameAndType2(Map<String, Object> search);
	
	Dictionary findByNameAndType3(@Param("name") String name, @Param("type") String type);
	
	Dictionary findByNameAndType4(String name, String type);
	
	int create (Dictionary d);
	
	int update (Dictionary d);
	
	int update2 (Dictionary d);
	
	int delete (Integer id);

	List<Dictionary> findAllByNameLike(String string);

	List<Dictionary> findAllByNameLike2(@Param("name")String string);

	List<Dictionary> findAllBy(@Param("field")String field, @Param("value")String value);

	List<Dictionary> findAllBySearch(Dictionary d);
	
	List<Dictionary> findAllBySearch2(@Param("name") String search);

	List<Dictionary> findAllBySearch3(Dictionary d);
	
	List<Dictionary> findAllByIds(List<Integer> ids);
}
